-- GENERATED SPELL FOR [Quel'Lithien Protector] --


function spell0_12322(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(11978,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12322', 6314, 1)
end

function spell1_12322(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15547,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12322', 592, 1)
end

function spell2_12322(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(12057,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12322', 563, 1)
end

function Sorts_12322(pUnit, Event)
local choix_sorts_12322 = math.random(0, 2)
if choix_sorts_12322 == 0 then
pUnit:RegisterEvent('spell0_12322', 1, 1)
end
if choix_sorts_12322 == 1 then
pUnit:RegisterEvent('spell1_12322', 1, 1)
end
if choix_sorts_12322 == 2 then
pUnit:RegisterEvent('spell2_12322', 1, 1)
end
end

function mob12322_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12322', math.random(1500, 3000), 1)
end

function mob12322_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12322_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12322_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12322, 1, 'mob12322_Action')
RegisterUnitEvent(12322, 2, 'mob12322_Leave')
RegisterUnitEvent(12322, 3, 'mob12322_Kill')
RegisterUnitEvent(12322, 4, 'mob12322_Die')
